package com.example.demo.controller;

import java.util.Map;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController  
@RequestMapping("/api")
public class AjaxController {
	@RequestMapping(value = "/postData" , method = RequestMethod.GET)
	@ResponseBody
	public  ResponseEntity<?> postData(Map<String,Object> map) {
		map.put("msg", "Hello Thymeleaf");
		map.put("msg1", "Hello Thymeleaf1");
		return ResponseEntity.ok(map);
	}
}
